package com.test;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.InetAddress;
import java.net.Socket;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

import com.core.Core;

public class Main {
	public static void main(String[] args) throws Exception {
		
		Scanner cin2 = new Scanner(
				new Socket(InetAddress.getByName("10.5.25.193"), 9999).getInputStream());
		
		FileWriter fileWriter = new FileWriter("src/copy");
		while(cin2.hasNext()) {
			String str = cin2.nextLine();
			fileWriter.write(str + "\r\n");
			System.out.println(str);
			fileWriter.flush();
		}
		fileWriter.close();
		cin2.close();
	}
}